<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /**
     * 1、封装一个输入半径求圆的面积的函数
     */
    function circle(radius) {
        var PI = 3.14;
        var area = PI * radius * radius;
        var c = 2 * PI * radius;
        alert("圆的面积是：" + area);
        alert("圆的周长是：" + c);

    }

    var a = prompt("请输入圆的半径：", "");
    circle(a);


</script>
</body>
</html>